package com.sky.api.member;

import com.sky.dto.member.UmsMemberVO;
import com.sky.entity.GiteeEntity;
import com.sky.to.member.MemberReceiveAddressTo;
import com.sky.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "sky-mall-member")
public interface MemberFeignService {

    @PostMapping("/umsMember/addUmsMember")
    R<Boolean> addUmsMember(@RequestBody UmsMemberVO vo);

    @PostMapping("/umsMember/login")
    R<UmsMemberVO> login(@RequestBody UmsMemberVO vo);

    @PostMapping("/umsMember/giteeLoginByToken")
    R<UmsMemberVO> giteeLoginByToken(@RequestBody GiteeEntity giteeEntity);

    @GetMapping("/umsMemberAddress/getAddressByMemberId")
    R<List<String>> getAddressByMemberId(@RequestParam("memberId") Long memberId);

    @GetMapping("/umsMember/getMemberById")
    R<UmsMemberVO> getMemberById(@RequestParam("memberId") Long memberId);

    @GetMapping("/umsMemberAddress/getAddressById")
    R<MemberReceiveAddressTo> getAddressById(@RequestParam("addrId") Long addrId);
}
